﻿#include "FITKNasSectionInfoPSHELL.h"


namespace Interface
{

    FITKNasSectionInfoPSHELL::FITKNasSectionInfoPSHELL()
    {
        _bendingMoment.setDefault(1.0);
        _transverseShear.setDefault(0.833333 );
    }

    FITKNasAbstractSectionInfo::NasSectionType FITKNasSectionInfoPSHELL::getNasSectionType()
    {
        return FITKNasAbstractSectionInfo::NasSectionPSHELL;
    }

    void FITKNasSectionInfoPSHELL::setBendingMoment(const double & value)
    {
        _bendingMoment.setValue(value);
    }


    double FITKNasSectionInfoPSHELL::getBendingMoment() const
    {
        return _bendingMoment.getValue();
    }

    void FITKNasSectionInfoPSHELL::setTransverseShear(const double & value)
    {
        _transverseShear.setValue(value);
    }

    double FITKNasSectionInfoPSHELL::getTransverseShear() const
    {
        return _transverseShear.getValue();
    }

    void FITKNasSectionInfoPSHELL::setNonStructuralMass(const double & value)
    {
        _nonstructualMass.setValue(value);
    }

    double FITKNasSectionInfoPSHELL::getNonStructuralMass() const
    {
        return _nonstructualMass.getValue();
    }

    void FITKNasSectionInfoPSHELL::setFiberDistanceZ1(const double & value)
    {
        _z1.setValue(value);
    }

    double FITKNasSectionInfoPSHELL::getFiberDistanceZ1() const
    {
        return _z1.getValue();
    }

    void FITKNasSectionInfoPSHELL::setFiberDistanceZ2(const double & value)
    {
        _z2.setValue(value);
    }

    double FITKNasSectionInfoPSHELL::getFiberDistanceZ2() const
    {
        return _z2.getValue();
    }

    const Core::FITKAbstractParamValueDouble& FITKNasSectionInfoPSHELL::getParam(const QString & param, bool& res)
    {
        res = true;

        if (param == "BendingMoment")
            return _bendingMoment;
        else if (param == "TransverseShear")
            return _transverseShear;
        else if (param == "NonStructuralMass")
            return _nonstructualMass;
        else if (param == "FiberDistanceZ1")
            return _z1;
        else if (param == "FiberDistanceZ2")
            return _z2;
        else
            res = false;
        return Core::FITKAbstractParamValueDouble();


    }

}



